<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: a
  Date: 2021-06-05
  Time: 9:14
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>用户订单系统</title>
    <%--    bootstrap美化页面--%>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">

    <script src="../../layui/layui.js"></script>
    <link rel="stylesheet" href="../../layui/css/layui.css"  />
</head>
<body>
<ul class="layui-nav">
    <li class="layui-nav-item">
        <a href="${pageContext.request.contextPath}/book/first">主页<span class="layui-badge-dot"></span></a>
    </li>
    <li class="layui-nav-item">
        <a href="${pageContext.request.contextPath}/shopCar">我的购物车<span class="layui-badge-dot"></span></a>
    </li>
    <li class="layui-nav-item">
        <a href="${pageContext.request.contextPath}/userAllOrder">我的订单<span class="layui-badge-dot"></span></a>
    </li>
    <li class="layui-nav-item" lay-unselect="">
        <a href="javascript:;"><img src="//t.cn/RCzsdCq" class="layui-nav-img">个人中心</a>
        <dl class="layui-nav-child">
            <dd><a href="${pageContext.request.contextPath}/toUpdateUserInfor">修改信息</a></dd>
            <dd><a href="${pageContext.request.contextPath}/toUpdataPassword">修改密码</a></dd>
            <dd><a href="${pageContext.request.contextPath}/logout">注销</a></dd>
        </dl>
    </li>
</ul>
<div class="container" style="border:1px solid #bfd1eb;background:#f3faff">

    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="page-header">
                <h1>
                    <small>用户订单详情</small>
                </h1>
            </div>
        </div>
    </div>
    <div class="container-fluid">
        <div class="row-fluid">
            <div class="span12">
                <div class="row-fluid">
                    <div class="span4">
                        <div class="btn-group" style="float: right;">
                            <form class="form-search" action="${pageContext.request.contextPath}/userQueryOrder">
                                <select class="selectpicker" name="userQueryOrder">
                                    <option value="0">--请选择--</option>
                                    <option value="orderId">订单号</option>
                                    <option value="userName">用户名称</option>
                                    <%--                        orderId实现准确查询 userName实现模糊查询 --%>
                                </select>
                                <input class="input-medium search-query" type="text" name="Value"/> <button type="submit" class="btn">查找</button>
                            </form>
                        </div>
                    </div>
                </div>
                <table class="table">
                    <thead>
                    <tr>
                        <th>订单编号</th>
                        <th>用户ID</th>
                        <th>用户名称</th>
                        <th>用户手机号</th>
                        <th>地址</th>
                        <th>订单金额</th>
                        <th>下单时间</th>
                        <th>订单备注</th>
                    </tr>
                    </thead>
                    <tbody>
                    <c:forEach var="order" items="${orderListByuserId}">
                        <tr>
                            <td>${order.orderId}</td>
                            <td>${order.userId}</td>
                            <td>${order.userName}</td>
                            <td>${order.telNumber}</td>
                            <td>${order.address}</td>
                            <td>&yen;${order.payment}</td>
                            <td>${order.orderTime}</td>
                            <td>${order.message}</td>

                            <td>
                                <a href="${pageContext.request.contextPath}/orderDetails?orderId=${order.orderId}">订单详情</a>
                            </td>
                        </tr>
                    </c:forEach>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>



<script>

    //注意：折叠面板 依赖 element 模块，否则无法进行功能性操作
    layui.use('element', function(){
        var element = layui.element;

        //…
    });
</script>
</body>
</html>
